package com.vmware2.vim25.mo.samples.vm;

import com.vmware.vim25.ProfileExpressionMetadata;
import com.vmware.vim25.mo.ServiceInstance;

import java.net.MalformedURLException;
import java.net.URL;
import java.rmi.RemoteException;

/**
 * @projectName: learn_used_code
 * @packageName: com.vmware2.vim25.mo.samples.vm
 * @className: com.vmware2.vim25.mo.samples.vm-> TestProfileId
 * @createDate: 2022-04-18 16:39
 * @author: ZhangSheng
 * @version: 1.0
 * @description:
 */
public class TestProfileId {


    public static void main(String[] args) throws MalformedURLException, RemoteException {
        String ipAddress = "192.168.157.2";
        Integer port = 443;
        String userName = "frank@vsphere.local";
        String password = "frank@123";
        String hostname = "192.168.157.11";
        URL url = new URL("https", ipAddress, port, "/sdk");
        ServiceInstance si = new ServiceInstance(url, userName, password, true);
        ProfileExpressionMetadata[] profileExpressionMetadata = si
                .getProfileComplianceManager()
                .queryExpressionMetadata(new String[]{"vCLS (2)"});
        System.out.println(profileExpressionMetadata);

    }
}
